﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IHISCETeim.BLL;
using IHISCETeim.Library;
using IHISCETeim.Model;
using System.Data;

namespace IHISCETeim.Web.AgentSys.PWMgr
{
    public partial class ExportAgentPWMacList : AgentPWMacList
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DataBind2();
        }
        protected DataTable sumdt = null;
        protected void DataBind2()
        {
            DataTableCollection dtc = AgentPWMacKeepController.AgentPWMacKeep_GetPagination(GetSqlWhere(), pageNum, 999999, SQLSort, ref TotalCount);
            this.rpMenu.DataSource = dtc[0];
            this.rpMenu.DataBind();

            sumdt = dtc[1];
            ExportToExecl("保外机器保养管制表", this.rpMenu);
            // AddLog(Permission.查看);
        }
        protected override string GetShowStr(object _UMKDID, object _showStr, object _KeepHours, object _SerialNumber, object _PWUMKID)
        {
            int UMKDID = 0;
            if (!int.TryParse(_UMKDID.ToString(), out UMKDID))
            {
                return "";
            }
            else
            {
                return _showStr.ToString() ;
                //return _showStr.ToString();
            }

        }
    }
}